package com.github.ginirohikocha.server;

import java.net.UnknownHostException;

public class Terminal {

	public Terminal() {
		
	}
	
	public Terminal(String ip, int port) throws UnknownHostException {
		setIp(ip);
		setPort(port);
	}
	
	public Terminal(String name, String ip, int port) throws UnknownHostException {
		this(ip, port);
		setName(name);
	}
	
	private String name;
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	private String ip;
	
	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	private int port;

	public void setPort(int port) {
		this.port = port;
	}

	public int getPort() {
		return port;
	}
	
	@Override
	public String toString() {
		return "["+getName()+"]"+getIp()+":"+getPort();
	}
}
